<script language="javascript">
    function conf(){
    var x=confirm("Bạn có chắc chắn muốn xóa không?");
    if(x==true)
    return true;
    else
    return false;
}

</script>
<?php    
    include("public/includes/headerAdmin.php");
    include("public/includes/popup.php");
?>   
    <div id="content">
        <form name="deleteall" method="post" action="proceed/p_deletepost.php">
            <table width="1024" border="0" align="center" cellpadding="8" cellspacing="1">
              <tr id="th">
                <td colspan="2" align="center"><input type="checkbox" name="check" onclick="if(check.checked==true) checkall(); else uncheckall();"/>&nbsp; CheckAll</a></td>
                <td align="center">STT</td>
                <td align="center">Name</td>
                <td align="center">Email</td>
                <td align="center">Subject</td>
                <td align="center">Contents</td>
            	<td align="center">Days post</td>
             </tr>
        <?php
            foreach($this->infoSubmitTBL as $key =>$value){
                if($value['stt'] %2 ==0){
                    echo "<tr id='td' bgcolor='#FFCCCC'>";                
                }else{
                    echo " <tr id='td'>";
                }
                
                echo '<td width="24" align="center">
                        <input type="checkbox" name="check[]" value="'.$value['id'].'" /></td>
                        <td width="24" align="center"><a href="./?rt=post&action=delete&id='.$value['id'].'" title="Xóa" onclick="
                    	   return conf();">
                            <img src="public/images/b_drop.png" border="0" /></a>
                        </td>
                        <td width="35" align="center">'.$value['stt'].'></td>
                        <td width="93">'.$value['ten'].'</td>
                        <td width="258">'.$value['email'].'</td>
                        <td width="67">'.$value['chude'].'</td>
                        <td width="66">'.$value['noidung'].'</td>
      	                <td width="66">'.$value['ngaypost'].'</td>
                      </tr>';                                             
            }
        ?>
            
                    <tr id="tf">
                        <td colspan="2" align="center" bgcolor="#FFCCCC"><span id="result_box" lang="en" xml:lang="en"><input type="submit" name="deleteall" value="Delete" class="button"/></span></td>
                        <td colspan="7" align="center" bgcolor="#FFCCCC">
                            <span id="result_box" lang="en" xml:lang="en">Total items : 
                                <font color="#FF0000"><b><?php echo $this->row;?></b></font> 
                            </span>
                        </td>
                      </tr>  
                </table>
            </form>  		    
    </div>
<?php
    
    include("public/includes/footerAdmin.php");
?>